<?php

// Extend the TCPDF class to create custom Header and Footer
class RenykalayaPDF extends TCPDF {

	protected $title = "EnView-Motor Tool Energy Reporting ";
	
	public function setTitle($title) {
		$this->title = $title;
	}

    //Page header
    public function Header() {
        // Logo
        //$image_file = '../images/landing/logo.jpg';
        //$this->Image($image_file, 10, 10, '', '', 'JPG', '', 'T', false, 300, '', false, false, 0, false, false, false);
        // Set font
        $this->SetFont('helvetica', 'B', 20);
        // Title
		$this->SetY(10);
        $this->Cell(0, 10, $this->title, 0, false, 'C', 0, '', 0, false, 'M', 'M');
		
		$this->SetFont('helvetica', 'B', 10);
        // Title
		$this->SetY(18);
		$this->setColor("text",53,144,17);
        $this->Cell(0, 10, 'www.en-view.com ', 0, false, 'C', 0, '', 0, false, 'M', 'M');
    }

    // Page footer
    public function Footer() {
        // Position at 15 mm from bottom
        $this->SetY(-15);
        // Set font
        $this->SetFont('helvetica', 'I', 8);
        // Page number
        $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');
    }
}

?>